-- UNITDEF -- debaser --
--------------------------------------------------------------------------------

local unitName = "debaser"

--------------------------------------------------------------------------------

local unitDef = {
  buildCostMetal     = 100,
  canMove            = false,
  canstop            = 1,
  category           = [[BASE ARMORED TARGET]],
  commander          = true,
  CollisionSphereScale   = 1.0,
  collisionVolumeOffsets = [[0 0 0]],
  collisionVolumeScales  = [[60 60 90]],
  collisionVolumeTest    = 1,
  collisionVolumeType    = [[box]],
  corpse              = [[DEAD]],
  description        = [[Base of Operations]],
  explodeAs          = [[BaseDeath]],
  footprintX         = 4,
  footprintZ         = 6,
  iconType           = [[base]],
  maxDamage          = 20000,  --sides 2 front 4 8 total
  maxSlope           = 255,
  name               = [[Mountain Base Side Entrance]],
  objectName         = [[debaser.s3o]],
  radarDistance      = 0,
  selfDestructAs     = [[BaseDeath]],
      sfxtypes = {
		explosiongenerators = {
		[[custom:flashmuzzle1]],
		[[custom:missileshot]],
		},
	},
  showNanoFrame      = false,
  sightDistance      = 800,
  unitname           = [[base]],
  yardMap            = [[ooooo ooooo ooooo ooooo ooooo ooooo ooooo ooooo ooooo]],
  -- sounds = {
    -- arrived = {
      -- [[commandgiven]],
    -- },
    -- ok = {
      -- [[commandgiven]],
    -- },
    -- select = {
      -- [[select]],
    -- },
  -- },
  
  weapons                = {

    {
      def                = [[db1]],
	  badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
    },
    {
      def                = [[db2]],
      badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
	  slaveTo            = 1,
    },
  },


weaponDefs             = {
  
db1 = {
id                 = 1,
	avoidFriendly      = false,
    burst              = 8,
    burstrate          = .1,
    collideFriendly    = false,
    craterBoost        = 0,
    craterMult         = 0,
    duration           = .02,
    explosionGenerator = [[custom:none]],
    id                 = 1,
    impactonly         = 1,
    impulseBoost       = 0,
    impulseFactor      = 0,
    name               = [[Phalanx]],
    range              = 600,
    reloadtime         = 1,
    rgbColor           = [[0.8 0.6 0.2]],
    soundStart         = [[autocannon]],
    sprayAngle         = 800,
    thickness          = 0.5,
    tolerance          = 1000,
    turret             = true,
    weaponType         = [[LaserCannon]],
    weaponVelocity     = 1200,
	InterceptedByShieldType = 2,
    damage = {
      default            = 12.5,
    },
  },
  
 db2 = {
    name = [[Missile Launcher]], 
	id = 1,
	rendertype = 1,
	lineofsight = 1,
	turret = 1,
	ballistic = 0,
	smoketrail = 1,
	smokedelay = .1,
	model = [[srocket.s3o]],
	collideFriendly     =  false,
	accuracy = 900,
	range = 800, 
	wobble = 500,
	reloadtime = 4,
	areaofeffect = 90,
	weapontimer = 5,
	weaponvelocity = 850,
	startvelocity = 550,
	weaponacceleration = 320,
	turnrate = 8000, --counter wobble?
	metalpershot = 0,
    energypershot = 0,	
	soundstart = [[Rocket]],
	soundhit = [[medexplo]],
	soundTrigger = 1,
	firestarter = 70,
	guidance = 1,
	tracks = 1,
	selfprop = 1,
	tolerance = 1000,
	explosiongenerator = [[custom:SMALLMISSILE_EXPLOSION]],
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	startsmoke = 1,
	InterceptedByShieldType = 2,

    damage = {
      default            = 500,
			},
		},
		
    },
  --- end of weapons
  
   featureDefs            = {

    DEAD  = {
      description      = [[Wreckage - Base]],
      blocking         = false,
      category         = [[corpses]],
      damage           = 99000,
      energy           = 0,
    --  featureDead      = [[DEAD2]],
      footprintX       = 6,
      footprintZ       = 9,
      height           = [[35]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[debaser_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 2400,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },

  },
  
  }
--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
